Conversation
📝 WalkthroughWalkthroughAdds an optional RefreshStatus callback into the debug bundle generation flow, invokes it to refresh health/WireGuard stats before embedding status, and consolidates WireGuard stats collection into Status.RefreshWireGuardStats(). Changes
Sequence DiagramsequenceDiagram
participant Client
participant Server
participant BundleGen as BundleGenerator
participant Engine
participant StatusRec as StatusRecorder
Client->>Server: Request debug bundle
Server->>Server: Create refreshStatus callback (calls Engine.RunHealthProbes(true))
Server->>BundleGen: NewBundleGenerator(deps with RefreshStatus)
BundleGen->>BundleGen: addStatus()
alt RefreshStatus provided
BundleGen->>Server: Invoke RefreshStatus()
Server->>Engine: RunHealthProbes(true)
Engine->>StatusRec: RefreshWireGuardStats()
StatusRec->>StatusRec: Fetch wg stats, update peer metrics
end
BundleGen->>Client: Return debug bundle with status
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Describe your changes
Refresh WireGuard statistics in status queries and debug bundles
WireGuard handshake times and transfer statistics were stale in status
output and debug bundles, relying on cached values updated only during
periodic health probes (every 5+ seconds).
Changes:
WireGuard stats refresh (~1ms)
of health probe throttling
before debug bundle generation
Result: Status output and debug bundles now contain accurate, real-time
WireGuard handshake times and transfer statistics.
Issue ticket number and link
Stack
Checklist
Documentation
Select exactly one:
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.